package cn.tedu.jsd2210.csmall.product.preload;

import cn.tedu.jsd2210.csmall.product.mapper.AlbumMapper;
import cn.tedu.jsd2210.csmall.product.pojo.vo.AlbumListItemVO;
import cn.tedu.jsd2210.csmall.product.pojo.vo.AlbumStandardVO;
import cn.tedu.jsd2210.csmall.product.service.IAlbumService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
//@Component
public class CachePreload implements ApplicationRunner {

    @Autowired
    private IAlbumService albumService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.debug("开始执行CachePreload.run()");
        albumService.rebuildCache();

    }

}
